package com.twu.biblioteca.dao;

import com.twu.biblioteca.IBookDao;
import com.twu.biblioteca.modal.Book;

import java.util.ArrayList;
import java.util.List;

public class MemoryBookDao implements IBookDao {
    private final List<Book> books;

    public MemoryBookDao() {
        books = new ArrayList<Book>();
        books.add(new Book(1, "Animal Farm", "George Orwell", 1945));
        books.add(new Book(2, "Adventures of Tom Sawyer", "Mark Twain", 1876));
        books.add(new Book(3, "A Case of Identity", "Arthur Conan", 1891));
    }

    @Override
    public List<Book> getBooks() {
        return books;
    }
}
